<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use App\Http\Controllers\Admin\IndexController;
use Illuminate\Support\Facades\View;
use Illuminate\Http\Request;
//use Symfony\Component\HttpFoundation\Request;

class CommonServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap the application services.
     *
     * @return void
     */
    public function boot()
    {
        View::composer('admin.layout.menu', function ($view) {
            $view->with(
                'menu' , IndexController::getMenu()
            );
        });
        View::composer('admin.layout.crumb', function ($view) {
            $view->with(
                'crumbs', IndexController::getCrumbs()
            );
        });
    }

    /**
     * Register the application services.
     *
     * @return void
     */
    public function register()
    {
        //
    }
}
